<?php // no direct access
defined('_JEXEC') or die('Restricted access'); 
$user = JFactory::getUser();
?>
<script type="text/javascript">
<!--
	Window.onDomReady(function(){
		document.formvalidator.setHandler('passverify', function (value) { return ($('password').value == value); }	);
	});
// -->
</script>
<div class="w739 float_right">
<div class=""> 
        <p><span class="float_left f28">	<?php echo "Rediger dine oplysninger" ;?></span><span class="link-login"><a href="index.php?option=com_user&view=user&layout=profile&Itemid=13"><?php if($user->guest==0) {echo  "Min Profil";} ;?></a><a href="index.php?option=com_user&view=login&task=logout&Itemid=13" class="m12l"><?php if($user->guest==0) {echo  "Log ud";};?></a></span></p>
    <div class="cb"></div>
	<div class="tt m10b"></div>

      </div>
      <div class="box_gude p10l p15t p30b">
          <div class="form_tilmelding1 m100l w462 profil-info">
          	
            <form action="<?php echo JRoute::_( 'index.php' ); ?>" method="post" id ="userform" name="userform" autocomplete="off" class="form-validate1">
<?php if ( $this->params->def( 'show_page_title', 1 ) ) : ?>
	<div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
	
	</div>
<?php endif; ?>

<!-- <tr>
	<td>
		<label for="username">
			<?php echo JText::_( 'Navn' ); ?>:
		</label>
	</td>
	<td>
		<span><?php echo $this->user->get('username');?></span>
	</td>
</tr> -->

		<label for="name">
			<?php echo JText::_( 'Your Name' ); ?>:
		</label>
	
		<input class="nyhed_txt1" type="text" id="name" name="name" value="<?php echo $this->escape($this->user->get('name'));?>" size="40" />

		<label for="email">
			<?php echo JText::_( 'email' ); ?>:
		</label>
        <input class="nyhed_txt1" type="text" id="email" name="email" value="<?php echo $this->escape($this->user->get('email'));?>" size="40" disabled="disabled" />

<?php if($this->user->get('password')) : ?>

		<label for="password">
			<?php echo JText::_( 'Adgangskode' ); ?>:
		</label>

		<input class="nyhed_txt1" type="password" id="password" name="password" value="" size="40" />

		<label for="password2">
			<?php echo JText::_( 'Verify Password' ); ?>:
		</label>

		<input class="nyhed_txt1" type="password" id="password2" name="password2" size="40" />
	
		<label for="address">
			<?php echo JText::_( 'Address' ); ?>:
		</label>

		<input class="nyhed_txt1" type="text" id="address" name="address" value="<?php echo $this->escape($this->user->get('address'));?>" size="40" />
	
		<label for="code">
			<?php echo JText::_( 'Postnr' ); ?>:
		</label>
	
		<input class="nyhed_txt1" type="text" id="code" name="code" value="<?php echo $this->escape($this->user->get('code'));?>" size="4" />

        <label for="city" style="width:33px;">
			<?php echo JText::_( 'By' ); ?>:
		</label>
	
		<input class="nyhed_txt1" type="text" id="city" name="city" value="<?php echo $this->escape($this->user->get('city'));?>" size="25" />
    	<label for="cvr">
			<?php echo JText::_( 'Phone' ); ?>:
		</label>

		<input class="nyhed_txt1" type="text" id="phone" name="phone"  value="<?php echo $this->escape($this->user->get('phone'));?>" size="40" />

        <label for="cvr">
			<?php echo JText::_( 'CVR-nr' ); ?>:
		</label>

		<input class="nyhed_txt1" type="text" id="cvr" name="cvr"  value="<?php echo $this->escape($this->user->get('cvr'));?>" size="40" />
<?php endif; ?>
 <div class="cb"></div>
<?php /*if(isset($this->params)) :  echo $this->params->render('params' ); endif;*/ ?>
	<label></label>
<!--<img src="templates/tpl_automobil/images/bt_save.jpg" onclick="submitbutton( this.form );return false;" /> -->
    <a id="btn_submit" href="javascript:void(0);">
    <img src="templates/tpl_automobil/images/btn_save.png"/></a>
	<input type="hidden" name="username" value="<?php echo $this->user->get('username');?>" />
	<input type="hidden" name="id" value="<?php echo $this->user->get('id');?>" />
	<input type="hidden" name="gid" value="<?php echo $this->user->get('gid');?>" />
	<input type="hidden" name="option" value="com_user" />
	<input type="hidden" name="task" value="save" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
            
            <div class="cb"></div>
         </div>
        </div>

</div>
<script type="text/javascript">
           jQuery(document).ready(function(cash) {
            //jQuery("#system-message").hide();
            //jQuery("#informessage").html(jQuery("#system-message  ul li").html());
            if(jQuery("#system-message  ul li").html()!=null)
                //alert(jQuery("#system-message  ul li").html());
              
              {
             	$('#alert').html(jQuery("#system-message  ul li").html());
                 $('#backoverlay').show();
		      	$('#show_popup').show();
              }
                
                
                
            });
</script>
<script>
close_popup=function(){		
		var fel=$('#f_focus').html();
        $('#backoverlay').hide();
		$('#show_popup').hide();
		$('#' + fel ).focus();
	};
    
</script>
<script type="text/javascript">
	$(document).ready(function(){	   
	$("#btn_submit").click(function(){
	   send();
	});
     send=function(){
        $('#userform').submit();

}
});
</script>